-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fulfil assignment #1848
Fulfil assignment #1848
Conversation
@@ -13,6 +13,9 @@ import {AssignmentsList} from './assignments-overview'; | |||
import {IPlanningExtensionConfigurationOptions} from './extension_configuration_options'; | |||
import {AutopostIngestRuleEditor} from './ingest_rule_autopost/AutopostIngestRuleEditor'; | |||
import {AutopostIngestRulePreview} from './ingest_rule_autopost/AutopostIngestRulePreview'; | |||
import ng from 'superdesk-core/scripts/core/services/ng'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extensions must not import anything neither from core nor planning. Instead either use superdesk api or planning api via bridge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix CI
Update package-json to use cc develop |
Address last comment from #1847 |
} | ||
}, | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether this would appear in authoring-angular as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're asking wether there would be a conflict thus two of the same actions rendering because of being registered in two places yes. I plan to address this in another PR, together with the external-app
thingy, as this is something that affects all actions so we need a generic solution.
I think doing a simple collision detection mechanism would suffice for now. If we have an action with the same id coming from extensions as well, we don't push it to the e.g. allActions
array. We skip that one, while prioritising existing ones. In react we don't show the angular registered ones, so this should be enough to ignore the react side for now. Later when we remove the angular implementation we will remove the filtering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extensions API have access to authoringReactViewEnabled
variable. What about using it to conditionally push the action?
Alternativelly, what about if we dropped the old action and kept only the new one? I did that with planning details widget - dropped the angular version of a widget - and the react one works in both - angular and react based authoring.
icon: 'cut', | ||
onTrigger: () => { | ||
const superdeskArticle = superdesk.entities.article; | ||
|
||
// keep in sync with client/planning-extension/src/extension.ts:123 | ||
// keep in sync with index.ts:108 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better keep relative path. There are lots of index files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you mean the absolute it would be something like superdesk-planning/index.ts
If relative, then this is it, and coincidentally index.ts really is the path & file name, relative to the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant relative to the project. You get it by right clicking open file tab and choosing "copy relative path"
|
||
window.dispatchEvent(event); | ||
// keep in sync with index.ts:79 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link relative path
why did you drop "keep in sync" comments? |
Because I've removed the registrations from angular |
SDESK-7015
What this PR achieves:
getActions
api